// parking_commands.h
#ifndef PARKING_COMMANDS_H
#define PARKING_COMMANDS_H

#include "parking_common.h"

// UI更新回调函数指针类型
typedef void (*ui_update_callback_t)(parking_data_t *data);

// 修改标记位定义
#define MODIFIED_TOTAL_SPACES      (1 << 0)
#define MODIFIED_FLOOR_B1_TOTAL    (1 << 1)
#define MODIFIED_FLOOR_B2_TOTAL    (1 << 2)
#define MODIFIED_FLOOR_B3_TOTAL    (1 << 3)
#define MODIFIED_FACILITY_SCORE    (1 << 4)
#define MODIFIED_SERVICE_SCORE     (1 << 5)
#define MODIFIED_SATISFACTION      (1 << 6)

// 命令处理函数
void network_handle_server_command(const char *command_data);
void handle_led_control(const char *action, const char *target, int value, const char *request_id);

// 数据访问函数
void get_parking_data(parking_data_t *dest);
void update_parking_data(parking_data_t *new_data);
void generate_simulated_data(parking_data_t *data);
void validate_parking_data(const parking_data_t *data);
void initialize_default_data(void);



#endif